<template>
	<view>
		<view class="topbox">
			<view class="topbox1">
				<view class="">我的余额（元）</view>
				<view class="top2">￥{{money}} > </view>
				<view class="">可提现{{money}}元</view>
			</view>
			<view class="topbox2" @click="toPage">去提现</view>
		</view>
		<view class="" v-for="i in datalist" :key="index">
			<view class="teb">
				<view class="">
					<view class="text">提现到{{i.tradeBankName}}</view>
					<view class="time">{{i.optDt}}</view>
				</view>
				<view class="money">
					{{i.withdrawAmout}}元
				</view>
			</view>
		</view>
	
	</view>
</template>

<script>
	import { queryByPrarm,queryStoreAcb } from '@/api/new.js'
	import {mapMutations,mapState} from 'vuex'
	export default {
		data() {
			return {
				money:'',
				datalist:[]
			}
		},
		computed: {
			...mapState({
				loginStatus: state => state.user.loginStatus,
				userInfo: state => state.user.userInfo
			})
		},
		onLoad() {
			this.getStoreAcb()
			this.getlist()
		},
		methods: {
			toPage(){
				uni.navigateTo({
				    url: '/pages/detail/index'
				});
			},
			getStoreAcb(){
				var data1 = {
					storeId:this.userInfo.storeId
				}
				queryStoreAcb(data1).then(res => {
					this.money = res.data.data
				})
			},
			getlist(){
				var data1 = {
					storeId:this.userInfo.storeId
				}
				queryByPrarm(data1).then(res => {
						this.datalist = res.data.data
				})
			}
		}
	}
</script>

<style scoped>
	.topbox{
		display: flex;
		background-image: linear-gradient(to right, rgba(61, 91, 211, 1.0),rgba(70, 113, 255, 1.0) );
		color: aliceblue;
		height: 300rpx;
		width: 100%;
		border-bottom: 1rpx solid #c2c2c2;
		margin-bottom: 20rpx;
	}
	.topbox1{
		width: 42%;
		color: #fff;
		margin-left: 70rpx;
		margin-top: 70rpx;
		font-size: 26rpx
	}
	.top2{
		font-size: 54rpx !important;
		font-weight: 600;
		line-height: 80rpx;
		margin-bottom: 20rpx;
	}
	.topbox2{
		margin-top: 100rpx;
		background: #fff;
		width: 200rpx !important;
		height: 100rpx;
		line-height: 100rpx;
		border-radius: 50rpx;
		font-weight: 600;
		font-size: 36rpx;
		margin-left: 50rpx;
		color: #3e72e1;
		text-align: center;
	}
	.teb{
		height: 120rpx;
		display: flex;
		border-bottom: 1rpx solid #c2c2c2;
		padding-top: 20rpx;
		padding-left: 30rpx;
	}
	.time{
		font-size: 26rpx;
		line-height: 60rpx;
		color: #ababab;
	}
	.money{
		margin-left: 300rpx;
		font-size: 34rpx;
		line-height: 90rpx;
		font-weight: 600;
		color: #414141;
	}
</style>
